import axios from '@/utils/request';
import path from '@/api/path';
export interface Role {
  id?: string;
  name: string;
  code: string;
  sort: number;
  status: number;
}
const api = {
  //请求get
  getFinish() {
    return axios.get(path.baseUrl + path.getfinish);
  },
  //post请求
  postRoles(data: Role) {
    return axios.post(path.baseUrl + path.postUrl, data);
  },
  //put请求
  putRoles(data: Role) {
    return axios.put(path.baseUrl + path.putUrl, JSON.stringify(data));
  },
  //put请求
  patchRoles() {
    return axios.patch(path.baseUrl + path.patchUrl);
  },
   //delete请求
   deleteRoles() {
    return axios.delete(path.baseUrl + path.deleteUrl);
  },
};

export default api;
